<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.ougy.reshop.model.User"%>
<%@page import="com.ougy.reshop.model.Region"%>
<%
	String cityName="长沙";
	Region city=(Region)request.getAttribute("city");
	if(city!=null){
		cityName=city.getName();
	}
 %>
<div id="header">
	<div class="head clearfix">
		<div class="city">
			<a class="fc-city" href="/" title=""><%=cityName %></a>
			<a href="switch.jsp">[切换城市]</a>
		</div>
		<div class="head-m">
		</div>
		<div class="head-r clearfix">
			<div class="fl reg-login"
				data-widget="app/ms_v2/common/base_page.js#userinfoWidget">
				<span class="reg-login-btn clearfix"> <%
					User user = (User) session.getAttribute("user");
					if (user == null) {
				%> <a class="reg js-signup-btn" href="register.html" title="免费注册"
					target="_self" rel="nofollow">免费注册</a> <a
					class="login js-signin-btn" href="login.jsp" title="会员登录"
					target="_self" rel="nofollow">会员登录</a> <%
 	} else {
 %> <a class="logined-a js-username" href="manager/index.jsp"
					title="用户中心" target="_blank"><%=user.getUsername()%><em
						class="user-arrow">&nbsp;</em>
				</a><a class="logined-b js-signout-btn"
					href="manager/logout"	target="_self" title="退出">退出</a> <%
 	}
 %> </span>
			</div>
		</div>
	</div>
</div>
